package com.iot.ammeter.mapper.web.campus;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iot.ammeter.dto.web.campus.RoomDTO;
import com.iot.ammeter.entity.web.campus.Room;
import com.iot.ammeter.entity.web.equipment.EquipmentModel;
import com.iot.ammeter.mapper.expand.ExpandBaseMapper;
import com.iot.ammeter.query.web.campus.RoomQuery;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 房间表 Mapper 接口
 * </p>
 *
 * @author basil
 * @since 2021-09-25
 */
public interface RoomMapper extends ExpandBaseMapper<Room> {
    /**
     * 获得房间信息列表
     *
     * @param pages          请求页码
     * @param roomQuery     房间查询条件
     * @return IPage
     */
    IPage<RoomDTO> listRooms(@Param("pages") Page<RoomDTO> pages, @Param("roomQuery") RoomQuery roomQuery);

    /**
     * 查询设备数量和安装数量
     *
     * @param equipmentIdentifier 设备唯一识别码
     * @return List
     */
    EquipmentModel selectNumber(String equipmentIdentifier);
}
